import Vue from 'vue'

import VueRouter from 'vue-router'

Vue.use(VueRouter)

VueRouter.prototype.goBack = function () { 
  　　this.isBack = true
      window.history.go(-1)
}
//引入子组件
import home from './components/home.vue';
import limitMoney from './components/limitMoney.vue';
import category from './components/category.vue';
import inlanddiscount from './components/inlanddiscount.vue';
import sitenav from './components/sitenav.vue';
import gsproduct from './components/gsproduct.vue';
import cheapCount from './components/cheapCount.vue';
import coupon from './components/coupon.vue';
import brandTitle from './components/brandTitle.vue';
import couponYH from './components/couponComps/couponYH.vue'
// import demoCoupon from './components/couponComps/demoCoupon.vue'
import categorySonList from './components/categorySonComps/categorySonList.vue';
import brandSonList from './components/brandSonComps/brandSonList.vue';
import brandSonSonList from './components/brandSonComps/brandSonSonList.vue';
import categorySonInfo from './components/categorySonComps/categorySonInfo.vue';
import islandInfo from './components/islandComps/islandInfo.vue'
import limitMoneySonInfo from './components/limitMoneySonComps/limitMoneySonInfo.vue'

var router = new VueRouter({
  routes: [
    {
      path: '/' ,component: home
    },{
      path: '/category' ,component: category
    },{
      path: '/categorySonList/:id' , component: categorySonList
    },{
      path: '/categorySonInfo/:id' , component: categorySonInfo
    },{
      path: '/moneyctrl' , component: limitMoney
    },{
      path: '/inlanddiscount' , component: inlanddiscount
    },{
      path: '/islandInfo/:id' , component: islandInfo
    },{
      path: '/limitMoneySonInfo/:id' , component: limitMoneySonInfo
    },{
      path: '/baicaijia' , component: cheapCount
    },{
      path: '/coupon' , component: coupon
    },{
      path: '/couponYH/:id' , component: couponYH
    },{
      path: '/gsproduct' , component: gsproduct
    },{
      path: '/sitenav' , component: sitenav
    },{
      path: '/brandTitle' , component: brandTitle
    },{
      path: '/brandSonList/:id' , component: brandSonList
    },{
      path: '/brandSonSonList/:id' , component: brandSonSonList
    }
  ]
})
export default router